<%= decidim_form_for(@answer_form, url: proposal_proposal_answer_path(proposal, @answer_form), html: { class: "form form-defaults edit_proposal_answer" }) do |f| %>
  <div class="form__wrapper">
    <div class="card" id="proposal-answer">
      <div class="card-divider">
        <h2 class="card-title"><%= t ".title", title: present(proposal).title %></h2>
      </div>

      <% if Decidim.module_installed?(:templates) %>
        <%= render "decidim/templates/admin/proposal_answer_templates/template_chooser", form: f %>
      <% end %>

      <div class="row column flex items-center gap-x-4 my-2">
        <%= f.collection_radio_buttons :internal_state, available_states, :token, ->(a) { translated_attribute(a.title) }, prompt: true do |builder|
              builder.label { builder.radio_button + builder.text } end %>
      </div>

      <div class="row column">
        <%= f.translated :editor, :answer, autofocus: true, rows: 15 %>
      </div>

      <% if current_component.current_settings.answers_with_costs? %>
        <div class="row column">
          <%= f.number_field :cost %>
        </div>

        <div class="row column">
          <%= f.translated :editor, :cost_report, lines: 12 %>
        </div>

        <div class="row column">
          <%= f.translated :editor, :execution_period, lines: 12 %>
        </div>
      <% end %>
    </div>
  </div>
  <div class="item__edit-sticky">
    <div class="item__edit-sticky-container">
      <%= f.submit t(".answer_proposal"), class: "button button__sm button__secondary" %>
    </div>
  </div>
<% end %>
